package me.zhengjie.test;

import cn.hutool.core.date.DateTime;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import me.zhengjie.modules.domain.enterprise.*;
import me.zhengjie.modules.domain.intellectual.*;
import me.zhengjie.modules.utils.Contents;
import me.zhengjie.modules.utils.UUIDUtils;
import org.junit.jupiter.api.Test;

import java.math.BigDecimal;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import java.util.UUID;

public class test {

    @Test
    public void a() {
        String json = "{\n" +
                "    \"result\": {\n" +
                "        \"historyNames\": \"贵州力源液压股份有限公司;\",\n" +
                "        \"regStatus\": \"存续\",\n" +
                "        \"cancelDate\": null,\n" +
                "        \"regCapital\": \"77800.32万人民币\",\n" +
                "        \"city\": \"贵阳市\",\n" +
                "        \"staffNumRange\": \"5000-9999人\",\n" +
                "        \"industry\": \"汽车制造业\",\n" +
                "        \"historyNameList\": [\n" +
                "            \"贵州力源液压股份有限公司\"\n" +
                "        ],\n" +
                "        \"bondNum\": \"600765\",\n" +
                "        \"type\": 1,\n" +
                "        \"bondName\": \"中航重机\",\n" +
                "        \"updateTimes\": 1627952558000,\n" +
                "        \"revokeDate\": null,\n" +
                "        \"staffList\": {\n" +
                "            \"result\": [\n" +
                "                {\n" +
                "                    \"name\": \"姬苏春\",\n" +
                "                    \"id\": 1875401345,\n" +
                "                    \"type\": 2,\n" +
                "                    \"typeJoin\": [\n" +
                "                        \"董事长\"\n" +
                "                    ]\n" +
                "                },\n" +
                "                {\n" +
                "                    \"name\": \"冉兴\",\n" +
                "                    \"id\": 1799186709,\n" +
                "                    \"type\": 2,\n" +
                "                    \"typeJoin\": [\n" +
                "                        \"董事兼总经理\"\n" +
                "                    ]\n" +
                "                },\n" +
                "                {\n" +
                "                    \"name\": \"李平\",\n" +
                "                    \"id\": 2353584340,\n" +
                "                    \"type\": 2,\n" +
                "                    \"typeJoin\": [\n" +
                "                        \"董事\"\n" +
                "                    ]\n" +
                "                },\n" +
                "                {\n" +
                "                    \"name\": \"刘亮\",\n" +
                "                    \"id\": 1806838230,\n" +
                "                    \"type\": 2,\n" +
                "                    \"typeJoin\": [\n" +
                "                        \"董事\"\n" +
                "                    ]\n" +
                "                },\n" +
                "                {\n" +
                "                    \"name\": \"曹斌\",\n" +
                "                    \"id\": 1965623814,\n" +
                "                    \"type\": 2,\n" +
                "                    \"typeJoin\": [\n" +
                "                        \"董事\"\n" +
                "                    ]\n" +
                "                },\n" +
                "                {\n" +
                "                    \"name\": \"邱洪生\",\n" +
                "                    \"id\": 2208836664,\n" +
                "                    \"type\": 2,\n" +
                "                    \"typeJoin\": [\n" +
                "                        \"董事\"\n" +
                "                    ]\n" +
                "                },\n" +
                "                {\n" +
                "                    \"name\": \"张育松\",\n" +
                "                    \"id\": 1931469029,\n" +
                "                    \"type\": 2,\n" +
                "                    \"typeJoin\": [\n" +
                "                        \"董事\"\n" +
                "                    ]\n" +
                "                },\n" +
                "                {\n" +
                "                    \"name\": \"孙继兵\",\n" +
                "                    \"id\": 1882028867,\n" +
                "                    \"type\": 2,\n" +
                "                    \"typeJoin\": [\n" +
                "                        \"董事\"\n" +
                "                    ]\n" +
                "                },\n" +
                "                {\n" +
                "                    \"name\": \"于革刚\",\n" +
                "                    \"id\": 1767582012,\n" +
                "                    \"type\": 2,\n" +
                "                    \"typeJoin\": [\n" +
                "                        \"董事\"\n" +
                "                    ]\n" +
                "                },\n" +
                "                {\n" +
                "                    \"name\": \"崔龙\",\n" +
                "                    \"id\": 1905833345,\n" +
                "                    \"type\": 2,\n" +
                "                    \"typeJoin\": [\n" +
                "                        \"监事\"\n" +
                "                    ]\n" +
                "                },\n" +
                "                {\n" +
                "                    \"name\": \"白传军\",\n" +
                "                    \"id\": 2086236247,\n" +
                "                    \"type\": 2,\n" +
                "                    \"typeJoin\": [\n" +
                "                        \"监事\"\n" +
                "                    ]\n" +
                "                }\n" +
                "            ],\n" +
                "            \"total\": 11\n" +
                "        },\n" +
                "        \"legalPersonName\": \"姬苏春\",\n" +
                "        \"revokeReason\": \"\",\n" +
                "        \"regNumber\": \"520000000005018\",\n" +
                "        \"property3\": \"AVIC Heavy Machinery Co.,Ltd.\",\n" +
                "        \"creditCode\": \"91520000214434146R\",\n" +
                "        \"usedBondName\": \"力源液压->G力源->力源液压\",\n" +
                "        \"fromTime\": 847900800000,\n" +
                "        \"approvedTime\": 1582646400000,\n" +
                "        \"socialStaffNum\": 8884,\n" +
                "        \"alias\": \"中航重机\",\n" +
                "        \"companyOrgType\": \"其他股份有限公司(上市)\",\n" +
                "        \"actualCapitalCurrency\": \"人民币\",\n" +
                "        \"id\": 11684584,\n" +
                "        \"orgNumber\": \"214434146\",\n" +
                "        \"cancelReason\": \"\",\n" +
                "        \"toTime\": null,\n" +
                "        \"email\": \"zhzj@avic.com\",\n" +
                "        \"actualCapital\": \"-\",\n" +
                "        \"estiblishTime\": 847900800000,\n" +
                "        \"regInstitute\": \"贵阳市市场监督管理局贵州双龙航空港经济区分局\",\n" +
                "        \"taxNumber\": \"91520000214434146R\",\n" +
                "        \"businessScope\": \"法律、法规、国务院决定规定禁止的不得经营；法律、法规、国务院决定规定应当许可（审批）的，经审批机关批准后凭许可（审批）文件经营;法律、法规、国务院决定规定无需许可（审批）的，市场主体自主选择经营。（股权投资及经营管理；军民共用液压件、液压系统、锻件、铸件、换热器、飞机及航空发动机附件，汽车零备件的研制、开发、制造、修理及销售；经营本企业自产机电产品、成套设备及相关技术的出口业务；经营本企业生产、科研所需的原辅材料、机械设备、仪器仪表、备品备件、零配件及技术的进口业务；开展本企业进料加工和“三来一补”业务。液压、锻件、铸件、换热器技术开发、转让和咨询服务；物流；机械冷热加工、修理修配服务。）\",\n" +
                "        \"regLocation\": \"贵州双龙航空港经济区机场路9号太升国际A栋3单元5层\",\n" +
                "        \"regCapitalCurrency\": \"人民币\",\n" +
                "        \"tags\": \"存续;曾用名;定向增发;A股 | 中航重机 600765;项目品牌:中航重机;投资机构:中航重机;企业集团\",\n" +
                "        \"websiteList\": \"www.hm.avic.com\",\n" +
                "        \"phoneNumber\": \"0851-88600765\",\n" +
                "        \"district\": \"南明区\",\n" +
                "        \"name\": \"中航重机股份有限公司\",\n" +
                "        \"bondType\": \"A股\",\n" +
                "        \"percentileScore\": 9696,\n" +
                "        \"industryAll\": {\n" +
                "            \"categoryMiddle\": \"改装汽车制造\",\n" +
                "            \"categoryBig\": \"汽车制造业\",\n" +
                "            \"category\": \"制造业\",\n" +
                "            \"categorySmall\": \"\"\n" +
                "        },\n" +
                "        \"isMicroEnt\": 0,\n" +
                "        \"base\": \"gz\"\n" +
                "    },\n" +
                "    \"reason\": \"ok\",\n" +
                "    \"error_code\": 0\n" +
                "}";
        EnterpriseInformation e = new EnterpriseInformation();
        //e.setId(util.SnowFlakeUtil.getSnowFlakeId());
        //转化请求的 json 数据
        JSONObject jsonObject = JSONObject.parseObject(json);
        //System.out.println(jsonObject);
        JSONObject a1 = jsonObject.getJSONObject("result");
        //e.setHistoryNames(a1.getString("historyNames"));
        //e.setRegStatus(a1.getString("regStatus"));
        //e.setCancelDate(a1.getString("cancelDate"));
        //e.setRegCapital(a1.getString("regCapital"));
        //e.setCity(a1.getString("city"));
        //e.setStaffNumRange(a1.getString("staffNumRange"));
        //e.setIndustry(a1.getString("industry"));
        //JSONArray a2=a1.getJSONArray("historyNameList");
        //StringBuffer historyNameList=new StringBuffer();
        //for (Object o : a2) {
        //    historyNameList.append(o.toString()+",");
        //}
        //e.setHistoryNameList(historyNameList.toString());
        //e.setBondNum(a1.getString("bondNum"));
        //e.setType(a1.getString("type"));
        //e.setBondName(a1.getString("bondName"));
        //e.setUpdateTimes(a1.getString("updateTimes"));
        //e.setRevokeDate(a1.getString("revokeDate"));
        //e.setLegalPersonName(a1.getString("legalPersonName"));
        //e.setRevokeReason(a1.getString("revokeReason"));
        //e.setRegNumber(a1.getString("regNumber"));
        //e.setProperty3(a1.getString("property3"));
        //e.setCreditCode(a1.getString("creditCode"));
        //e.setUsedBondName(a1.getString("usedBondName"));
        //e.setFromTime(a1.getString("fromTime"));
        //e.setApprovedTime(a1.getString("approvedTime"));
        //e.setSocialStaffNum(a1.getString("socialStaffNum"));
        //e.setAlias(a1.getString("alias"));
        //e.setCompanyOrgType(a1.getString("companyOrgType"));
        //e.setActualCapitalCurrency(a1.getString("actualCapitalCurrency"));
        //e.setEyeId(a1.getLongValue("id"));
        //e.setOrgNumber(a1.getString("orgNumber"));
        //e.setCancelReason(a1.getString("cancelReason"));
        //e.setToTime(a1.getString("toTime"));
        //e.setEmail(a1.getString("email"));
        //e.setActualCapital(a1.getString("actualCapital"));
        //e.setEstiblishTime(a1.getString("estiblishTime"));
        //e.setRegInstitute(a1.getString("regInstitute"));
        //e.setTaxNumber(a1.getString("taxNumber"));
        //e.setBusinessScope(a1.getString("businessScope"));
        //e.setRegLocation(a1.getString("regLocation"));
        //e.setRegCapitalCurrency(a1.getString("regCapitalCurrency"));
        //e.setTags(a1.getString("tags"));
        //e.setWebsiteList(a1.getString("websiteList"));
        //e.setPhoneNumber(a1.getString("phoneNumber"));
        //e.setDistrict(a1.getString("district"));
        //e.setName(a1.getString("name"));
        //e.setBondType(a1.getString("bondType"));
        //e.setPercentileScore(a1.getString("percentileScore"));
        //e.setIsMicroEnt(a1.getString("isMicroEnt"));
        //e.setBase(a1.getString("base"));
        //List<EnterprisePersonnelInformation> employees=e.getEmployees();
        //EnterprisePersonnelInformation e1=null;
        //StringBuffer str=null;
        //JSONObject emp=null;
        //JSONObject join=null;
        //JSONArray a3=a1.getJSONObject("staffList").getJSONArray("result");
        //for (Object o : a3) {
        //    emp=(JSONObject)o;
        //    e1=new EnterprisePersonnelInformation();
        //    e1.setId(util.SnowFlakeUtil.getSnowFlakeId());
        //    e1.setName(emp.getString("name"));
        //    e1.setEyeId(emp.getLong("id"));
        //    e1.setType(emp.getInteger("type"));
        //    e1.setEnterpriseId(e.getId());
        //    str=new StringBuffer();
        //    for (Object typeJoin : emp.getJSONArray("typeJoin")) {
        //        str.append(typeJoin+",");
        //    }
        //    e1.setTypeJoin(str.toString());
        //    employees.add(e1);
        //}
        //System.out.println(a3);
        //Integer a5=a1.getJSONObject("staffList").getInteger("total");
        //System.out.println(a5);
        JSONObject a5 = a1.getJSONObject("industryAll");
        System.out.println(a5);
    }

    @Test
    public void a2() {
        Long l = Long.parseLong("1582646400000");
        Date dt = new Date(l);
        System.out.println(dt);
    }

    @Test
    public void a3() {
        BigDecimal decimal = BigDecimal.valueOf(9696.0 / 10000.0);
        System.out.println(decimal);
    }

    @Test
    public void a4() {
        System.out.println(new DateTime());
    }

    @Test
    public void a5() {
        String json = "{\n" +
                "    \"result\": {\n" +
                "        \"total\": 2,\n" +
                "        \"items\": [\n" +
                "            {\n" +
                "                \"cgid\": \"\",\n" +
                "                \"capital\": [\n" +
                "                    {\n" +
                "                        \"amomon\": \"1335417.36万人民币\",\n" +
                "                        \"paymet\": \"货币\",\n" +
                "                        \"time\": \"2021-06-03\",\n" +
                "                        \"percent\": \"99.50%\"\n" +
                "                    }\n" +
                "                ],\n" +
                "                \"name\": \"李彦宏\",\n" +
                "                \"capitalActl\": [],\n" +
                "                \"logo\": \"https://imgh.tianyancha.com/logo/human/2c89a37665fe7374a23694bad46330ba_d200x200.png\",\n" +
                "                \"alias\": \"李\",\n" +
                "                \"id\": 1984012283,\n" +
                "                \"type\": 2,\n" +
                "                \"hcgid\": \"1984012283-c22822\"\n" +
                "            },\n" +
                "            {\n" +
                "                \"cgid\": \"\",\n" +
                "                \"capital\": [\n" +
                "                    {\n" +
                "                        \"amomon\": \"6710.64万人民币\",\n" +
                "                        \"paymet\": \"货币\",\n" +
                "                        \"time\": \"2021-06-03\",\n" +
                "                        \"percent\": \"0.50%\"\n" +
                "                    }\n" +
                "                ],\n" +
                "                \"name\": \"崔珊珊\",\n" +
                "                \"capitalActl\": [],\n" +
                "                \"logo\": \"https://imgh.tianyancha.com/logo/human/086164804ac49f1d8c8ba0a9179017f2_d200x200.png\",\n" +
                "                \"alias\": \"崔\",\n" +
                "                \"id\": 1905070872,\n" +
                "                \"type\": 2,\n" +
                "                \"hcgid\": \"1905070872-c22822\"\n" +
                "            }\n" +
                "        ]\n" +
                "    },\n" +
                "    \"reason\": \"ok\",\n" +
                "    \"error_code\": 0\n" +
                "}";
        JSONObject jsonObject = JSONObject.parseObject(json).getJSONObject("result");
        Integer total = jsonObject.getInteger("total");
        JSONArray jsonArray = jsonObject.getJSONArray("items");
        List<EnterpriseShareholders> shareholdersList = new ArrayList<>();
        EnterpriseShareholders shareholders = null;
        JSONObject a1 = null;
        JSONObject a2 = null;
        JSONArray array1 = null;
        for (Object o : jsonArray) {
            shareholders = new EnterpriseShareholders();
            a1 = (JSONObject) o;
            shareholders.setCgId(a1.getLong("cgid"));
            shareholders.setName(a1.getString("name"));
            shareholders.setLogo(a1.getString("logo"));
            shareholders.setAlias(a1.getString("alias"));
            shareholders.setEyeId(a1.getLong("id"));
            shareholders.setType(a1.getInteger("type"));
            shareholders.setHcgId(a1.getString("hcgid"));
            array1 = a1.getJSONArray("capital");
            if (array1.size() > 0) {
                a2 = array1.getJSONObject(0);
                shareholders.setAmomon(a2.getString("amomon"));
                shareholders.setPaymet(a2.getString("paymet"));
                shareholders.setTime(a2.getDate("time"));
                shareholders.setPercent(a2.getString("percent"));
            }
            array1 = a1.getJSONArray("capitalActl");
            if (array1.size() > 0) {
                a2 = array1.getJSONObject(0);
                shareholders.setActlAmomon(a2.getString("amomon"));
                shareholders.setActlTime(a2.getDate("time"));
                shareholders.setActlPercent(a2.getString("percent"));
                shareholders.setActlPaymet(a2.getString("paymet"));
            }
            shareholdersList.add(shareholders);
        }
        shareholdersList.forEach(i -> {
            System.out.println(i);
        });
    }

    @Test
    public void a6() {
        String json = "{\n" +
                "\t\"result\": {\n" +
                "\t\t\"tmList\": [\n" +
                "\t\t\t{\n" +
                "\t\t\t\t\"regNo\": \"60618100\",\n" +
                "\t\t\t\t\"tmName\": \"百度问一问\",\n" +
                "\t\t\t\t\"tmPic\": \"https://tm-image.tianyancha.com/tm/822a4e0560502dd161421611dc5208ed.jpg\",\n" +
                "\t\t\t\t\"appDate\": \"2021-11-16\",\n" +
                "\t\t\t\t\"tmClass\": \"38\",\n" +
                "\t\t\t\t\"id\": 230424694,\n" +
                "\t\t\t\t\"intCls\": \"38-通讯服务\",\n" +
                "\t\t\t\t\"applicantCn\": \"北京百度网讯科技有限公司\",\n" +
                "\t\t\t\t\"category\": \"商标注册申请---申请收文\",\n" +
                "\t\t\t\t\"status\": \"等待实质审查\"\n" +
                "\t\t\t}\n" +
                "\t\t],\n" +
                "\t\t\"copyRegList\": [\n" +
                "\t\t\t{\n" +
                "\t\t\t\t\"publishTime\": null,\n" +
                "\t\t\t\t\"regTime\": \"2021-11-15\",\n" +
                "\t\t\t\t\"regNum\": \"2021SR1730571\",\n" +
                "\t\t\t\t\"simpleName\": \"可信数字身份\",\n" +
                "\t\t\t\t\"fullName\": \"超级链可信数字身份平台\",\n" +
                "\t\t\t\t\"authorNationality\": \"北京百度网讯科技有限公司\",\n" +
                "\t\t\t\t\"id\": 57640210,\n" +
                "\t\t\t\t\"catNum\": \"\",\n" +
                "\t\t\t\t\"version\": \"V1.0\"\n" +
                "\t\t\t}\n" +
                "\t\t],\n" +
                "\t\t\"copyRegWorksList\": [\n" +
                "\t\t\t{\n" +
                "\t\t\t\t\"publishTime\": \"2021-08-03\",\n" +
                "\t\t\t\t\"finishTime\": \"2021-06-20\",\n" +
                "\t\t\t\t\"regTime\": \"2021-11-09\",\n" +
                "\t\t\t\t\"regNum\": \"国作登字-2021-F-00258197\",\n" +
                "\t\t\t\t\"fullName\": \"百度知道产品形象-幸福鸭\",\n" +
                "\t\t\t\t\"authorNationality\": \"北京百度网讯科技有限公司\",\n" +
                "\t\t\t\t\"type\": \"美术作品\"\n" +
                "\t\t\t}\n" +
                "\t\t],\n" +
                "\t\t\"icpList\": [\n" +
                "\t\t\t{\n" +
                "\t\t\t\t\"webSite\": [\n" +
                "\t\t\t\t\t\"www.baidulog.com\"\n" +
                "\t\t\t\t],\n" +
                "\t\t\t\t\"license\": \"京ICP证030173号-172\",\n" +
                "\t\t\t\t\"ym\": \"baidulog.com\",\n" +
                "\t\t\t\t\"companyType\": \"企业\",\n" +
                "\t\t\t\t\"companyName\": null,\n" +
                "\t\t\t\t\"examineDate\": \"2021-09-17\",\n" +
                "\t\t\t\t\"webName\": \"百度AB实验开放平台\"\n" +
                "\t\t\t}\n" +
                "\t\t],\n" +
                "\t\t\"patentList\": [\n" +
                "\t\t\t{\n" +
                "\t\t\t\t\"agent\": \"孙静;黄健\",\n" +
                "\t\t\t\t\"patentNum\": \"CN202111201639.2\",\n" +
                "\t\t\t\t\"title\": \"一种车载天线\",\n" +
                "\t\t\t\t\"uuid\": \"ccb0e941f9aea97aa38f2119dac71f7a\",\n" +
                "\t\t\t\t\"applicationTime\": \"2021-10-15\",\n" +
                "\t\t\t\t\"patentStatus\": \"公开\",\n" +
                "\t\t\t\t\"inventor\": \"陈博宇;范宗涛;张彦福;王海松;刘万里\",\n" +
                "\t\t\t\t\"id\": 69214912,\n" +
                "\t\t\t\t\"pubNumber\": \"CN113745829A\",\n" +
                "\t\t\t\t\"lawStatus\": [\n" +
                "\t\t\t\t\t{\n" +
                "\t\t\t\t\t\t\"date\": \"\",\n" +
                "\t\t\t\t\t\t\"detail\": \"\",\n" +
                "\t\t\t\t\t\t\"status\": \"\"\n" +
                "\t\t\t\t\t}\n" +
                "\t\t\t\t],\n" +
                "\t\t\t\t\"address\": \"北京市海淀区上地十街10号百度大厦2层\",\n" +
                "\t\t\t\t\"appNumber\": \"CN202111201639.2\",\n" +
                "\t\t\t\t\"agency\": \"北京同立钧成知识产权代理有限公司\",\n" +
                "\t\t\t\t\"abstracts\": null,\n" +
                "\t\t\t\t\"idPrivate\": null,\n" +
                "\t\t\t\t\"grantDate\": \"\",\n" +
                "\t\t\t\t\"applicantName\": \"北京百度网讯科技有限公司\",\n" +
                "\t\t\t\t\"applicationPublishTime\": \"2021-12-03\",\n" +
                "\t\t\t\t\"pubDate\": \"2021-12-03\",\n" +
                "\t\t\t\t\"patentType\": \"发明专利\",\n" +
                "\t\t\t\t\"imgUrl\": \"[\\\"http://static.tianyancha.com/patent/abstractPic/CN/A/113/745/CN113745829A_HDA0003305165100000042.png\\\"]\",\n" +
                "\t\t\t\t\"mainCatNum\": \"H01Q1/42\",\n" +
                "\t\t\t\t\"patentName\": \"一种车载天线\",\n" +
                "\t\t\t\t\"postCode\": \"100085\",\n" +
                "\t\t\t\t\"grantNumber\": null,\n" +
                "\t\t\t\t\"allCatNum\": \"[\\\"H01Q1/42\\\", \\\"H01Q1/02\\\", \\\"H01Q1/36\\\", \\\"H01Q1/32\\\"]\",\n" +
                "\t\t\t\t\"applicationPublishNum\": \"CN113745829A\",\n" +
                "\t\t\t\t\"priorityInfo\": [\n" +
                "\t\t\t\t\t{\n" +
                "\t\t\t\t\t\t\"priorityNum\": \"\",\n" +
                "\t\t\t\t\t\t\"priorityDate\": \"\"\n" +
                "\t\t\t\t\t}\n" +
                "\t\t\t\t]\n" +
                "\t\t\t}\n" +
                "\t\t]\n" +
                "\t},\n" +
                "\t\"reason\": \"ok\",\n" +
                "\t\"error_code\": 0\n" +
                "}";
        List<Trademark> trademarkList = new ArrayList<>();
        List<Software> softwareList = new ArrayList<>();
        List<Works> worksList = new ArrayList<>();
        List<Website> websiteList = new ArrayList<>();
        List<Patent> patentList = new ArrayList<>();
        JSONObject jsonObject = JSONObject.parseObject(json).getJSONObject("result");
        JSONArray array = jsonObject.getJSONArray("tmList");
        System.out.println(jsonObject);
        JSONObject arrayJson = null;
        if (array.size() > 0) {
            Trademark trademark = null;
            for (Object o : array) {
                arrayJson = (JSONObject) o;
                trademark = new Trademark();
                trademark.setRegNo(arrayJson.getString("regNo"));
                trademark.setName(arrayJson.getString("tmName"));
                trademark.setPic(arrayJson.getString("tmPic"));
                trademark.setAppDate(arrayJson.getDate("appDate"));
                trademark.setTmClass(arrayJson.getString("tmClass"));
                trademark.setEyeId(arrayJson.getLong("id"));
                trademark.setIntCls(arrayJson.getString("intCls"));
                trademark.setApplicantCn(arrayJson.getString("applicantCn"));
                trademark.setCategory(arrayJson.getString("category"));
                trademark.setStatus(arrayJson.getString("status"));
                trademarkList.add(trademark);
            }
        }
        array = jsonObject.getJSONArray("copyRegList");
        if (array.size() > 0) {
            Software software = null;
            for (Object o : array) {
                arrayJson = (JSONObject) o;
                software = new Software();
                software.setRegTime(arrayJson.getDate("regTime"));
                software.setRegNum(arrayJson.getString("regNum"));
                software.setSimpleName(arrayJson.getString("simpleName"));
                software.setFullName(arrayJson.getString("fullName"));
                software.setAuthorNationality(arrayJson.getString("authorNationality"));
                software.setEyeId(arrayJson.getLong("id"));
                software.setCatNum(arrayJson.getString("catNum"));
                software.setVersion(arrayJson.getString("version"));
                softwareList.add(software);
            }
        }
        array = jsonObject.getJSONArray("copyRegWorksList");
        if (array.size() > 0) {
            Works works = null;
            for (Object o : array) {
                arrayJson = (JSONObject) o;
                works = new Works();
                works.setPublishTime(arrayJson.getDate("publishTime"));
                works.setFinishTime(arrayJson.getDate("finishTime"));
                works.setRegTime(arrayJson.getDate("regTime"));
                works.setRegNum(arrayJson.getString("regNum"));
                works.setFullName(arrayJson.getString("fullName"));
                works.setAuthorNationality(arrayJson.getString("authorNationality"));
                works.setType(arrayJson.getString("type"));
                worksList.add(works);
            }
        }
        array = jsonObject.getJSONArray("icpList");
        if (array.size() > 0) {
            Website website = null;
            StringBuffer str = null;
            JSONArray a1 = null;
            for (Object o : array) {
                arrayJson = (JSONObject) o;
                website = new Website();
                str = new StringBuffer();
                a1 = arrayJson.getJSONArray("webSite");
                for (Object o1 : a1) {
                    str.append(o1.toString() + ",");
                }
                website.setWebSite(str.toString());
                website.setLicense(arrayJson.getString("license"));
                website.setYm(arrayJson.getString("ym"));
                website.setCompanyType(arrayJson.getString("companyType"));
                website.setExamineDate(arrayJson.getDate("examineDate"));
                website.setWebName(arrayJson.getString("webName"));
                website.setCompanyName(arrayJson.getString("companyName"));
                websiteList.add(website);
            }
        }
        array = jsonObject.getJSONArray("patentList");
        if (array.size() > 0) {
            Patent patent = null;
            JSONObject a1 = null;
            System.out.println(array);
            for (Object o : array) {
                arrayJson = (JSONObject) o;
                patent = new Patent();
                patent.setAgent(arrayJson.getString("agent"));
                patent.setPatentNum(arrayJson.getString("patentNum"));
                patent.setTitle(arrayJson.getString("title"));
                patent.setUuid(arrayJson.getString("uuid"));
                patent.setApplicationTime(arrayJson.getDate("applicationTime"));
                patent.setPatentStatus(arrayJson.getString("patentStatus"));
                patent.setInventor(arrayJson.getString("inventor"));
                patent.setEyeId(arrayJson.getLong("id"));
                patent.setPubNumber(arrayJson.getString("pubNumber"));
                a1 = arrayJson.getJSONArray("lawStatus").getJSONObject(0);
                patent.setLawDate(a1.getDate("date"));
                patent.setLawDetail(a1.getString("detail"));
                patent.setLawStatus(a1.getString("status"));
                patent.setAddress(arrayJson.getString("address"));
                patent.setAppNumber(arrayJson.getString("appNumber"));
                patent.setAgency(arrayJson.getString("agency"));
                patent.setGrantDate(arrayJson.getDate("grantDate"));
                patent.setApplicantName(arrayJson.getString("applicantName"));
                patent.setApplicationPublishTime(arrayJson.getDate("applicationPublishTime"));
                patent.setPubDate(arrayJson.getDate("pubDate"));
                patent.setPatentType(arrayJson.getString("patentType"));
                patent.setImgUrl(arrayJson.getString("imgUrl"));
                patent.setMainCatNum(arrayJson.getString("mainCatNum"));
                patent.setPatentName(arrayJson.getString("patentName"));
                patent.setPostCode(arrayJson.getString("postCode"));
                patent.setAllCatNum(arrayJson.getString("allCatNum"));
                patent.setApplicationPublishNum(arrayJson.getString("applicationPublishNum"));
                a1 = arrayJson.getJSONArray("priorityInfo").getJSONObject(0);
                patent.setPriorityNum(a1.getString("priorityNum"));
                patent.setPriorityDate(a1.getDate("priorityDate"));
                patent.setIdPrivate(arrayJson.getString("idPrivate"));
                patentList.add(patent);
            }
        }
        IntellectualVo intellectualVo = new IntellectualVo();
        intellectualVo.setTrademarkList(trademarkList);
        intellectualVo.setSoftwareList(softwareList);
        intellectualVo.setWorksList(worksList);
        intellectualVo.setWebsiteList(websiteList);
        intellectualVo.setPatentList(patentList);
    }

    @Test
    public void a8() {
        String json = "{\n" +
                "\t\"result\": {\n" +
                "\t\t\"total\": 3383,\n" +
                "\t\t\"items\": [\n" +
                "\t\t\t{\n" +
                "\t\t\t\t\"date\": 1609430400000,\n" +
                "\t\t\t\t\"product\": \"莱茨狗\",\n" +
                "\t\t\t\t\"companyName\": \"Rage.Fan\",\n" +
                "\t\t\t\t\"icon\": \"https://qmp.oss-cn-beijing.aliyuncs.com/uploadImg/202103/product6059865ab43d6899287814.png?x-oss-process=style%2Fhezuo_img&OSSAccessKeyId=LTAI2SRf7Sf1P5bU&Expires=1681113127&Signature=DGVOh8%2B4JCyINfOF5vZzyW4rl2I%3D\",\n" +
                "\t\t\t\t\"setupDate\": 1609430400000,\n" +
                "\t\t\t\t\"yewu\": \"链上体育和游戏平台\",\n" +
                "\t\t\t\t\"jingpinProduct\": \"Rage.Fan\",\n" +
                "\t\t\t\t\"round\": \"种子轮\",\n" +
                "\t\t\t\t\"location\": \"美国\",\n" +
                "\t\t\t\t\"graphId\": null,\n" +
                "\t\t\t\t\"hangye\": \"区块链\",\n" +
                "\t\t\t\t\"value\": \"\",\n" +
                "\t\t\t\t\"iconOssPath\": \"logo/product/de2c9e18eb7fd2a2ce35dbd6ecd1ef52.png@!f_200x200\"\n" +
                "\t\t\t}\n" +
                "\t\t]\n" +
                "\t},\n" +
                "\t\"reason\": \"ok\",\n" +
                "\t\"error_code\": 0\n" +
                "}";
        JSONObject jsonObject = JSONObject.parseObject(json);
        String code = jsonObject.getString("error_code");
        List<EnterpriseProduct> productList = new ArrayList<>();
        if (code.equals("0")) {
            jsonObject = JSONObject.parseObject(json).getJSONObject("result");
            Integer total = jsonObject.getInteger("total");
            JSONArray array = jsonObject.getJSONArray("items");
            if (array.size() > 0) {
                System.out.println(array);
                JSONObject a1 = null;
                EnterpriseProduct product = null;
                for (Object o : array) {
                    a1 = (JSONObject) o;
                    product = new EnterpriseProduct();
                    product.setDate(a1.getDate("date"));
                    product.setProduct(a1.getString("product"));
                    product.setCompanyName(a1.getString("companyName"));
                    product.setIcon(a1.getString("icon"));
                    product.setSetupDate(a1.getDate("setupDate"));
                    product.setYeWu(a1.getString("yewu"));
                    product.setJingpinProduct(a1.getString("jingpinProduct"));
                    product.setRound(a1.getString("round"));
                    product.setLocation(a1.getString("location"));
                    product.setHangYe(a1.getString("hangye"));
                    product.setValue(a1.getString("value"));
                    product.setIconOssPath(a1.getString("iconOssPath"));
                    product.setCreateTime(new DateTime());
                    product.setDeleteFlag(false);
                    productList.add(product);
                }
            }
            for (int i = 2; i <= total / 20; i++) {
                //json=MyHttpUtils.GetJson(Contents.token,"http://open.api.tianyancha.com/services/open/cd/findJingpin/2.0?pageSize=20&keyword="+enterpriseName+"&pageNum="+1+"");
                jsonObject = JSONObject.parseObject(json).getJSONObject("result");
                array = jsonObject.getJSONArray("items");
                System.out.printf(i + "");
                if (array.size() > 0) {
                    System.out.println(array);
                    JSONObject a1 = null;
                    EnterpriseProduct product = null;
                    for (Object o : array) {
                        a1 = (JSONObject) o;
                        product = new EnterpriseProduct();
                        product.setDate(a1.getDate("date"));
                        product.setProduct(a1.getString("product"));
                        product.setCompanyName(a1.getString("companyName"));
                        product.setIcon(a1.getString("icon"));
                        product.setSetupDate(a1.getDate("setupDate"));
                        product.setYeWu(a1.getString("yewu"));
                        product.setJingpinProduct(a1.getString("jingpinProduct"));
                        product.setRound(a1.getString("round"));
                        product.setLocation(a1.getString("location"));
                        product.setHangYe(a1.getString("hangye"));
                        product.setValue(a1.getString("value"));
                        product.setIconOssPath(a1.getString("iconOssPath"));
                        product.setCreateTime(new DateTime());
                        product.setDeleteFlag(false);
                        productList.add(product);
                    }
                }
            }
        }
    }

    @Test
    public void a9() {
        String json = "{\n" +
                "\t\"result\": {\n" +
                "\t\t\"total\": 69,\n" +
                "\t\t\"items\": [\n" +
                "\t\t\t{\n" +
                "\t\t\t\t\"product\": \"红手指\",\n" +
                "\t\t\t\t\"money\": \"数千万人民币\",\n" +
                "\t\t\t\t\"round\": \"A轮\",\n" +
                "\t\t\t\t\"product_id\": \"b2fed305123\",\n" +
                "\t\t\t\t\"logo\": \"https://img5.tianyancha.com/logo/product/228f89618ae274f92e89dde6c8bc9b08.png@!f_200x200\",\n" +
                "\t\t\t\t\"news_url\": \"https://www.sohu.com/a/325425213_114778\",\n" +
                "\t\t\t\t\"news_title\": \"推\u200B云手机、云游戏业务，「微算互联」能否讲一个“ARM版阿里云”的故事？\",\n" +
                "\t\t\t\t\"invest_date\": \"2019-07-08\"\n" +
                "\t\t\t}\n" +
                "\t\t]\n" +
                "\t},\n" +
                "\t\"reason\": \"ok\",\n" +
                "\t\"error_code\": 0\n" +
                "}";

        JSONObject jsonObject = JSONObject.parseObject(json);
        String code = jsonObject.getString("error_code");
        jsonObject = JSONObject.parseObject(json).getJSONObject("result");
        String total = jsonObject.getString("total");
        JSONArray array = jsonObject.getJSONArray("items");
        List<EnterpriseInvestment> investmentList = new ArrayList<>();
        if (array.size() > 0) {
            JSONObject a1 = null;
            EnterpriseInvestment investment = null;
            for (Object o : array) {
                a1 = (JSONObject) o;
                investment = new EnterpriseInvestment();
                investment.setProduct(a1.getString("product"));
                investment.setMoney(a1.getString("money"));
                investment.setRound(a1.getString("round"));
                investment.setProductId(a1.getString("product_id"));
                investment.setLogo(a1.getString("logo"));
                investment.setNewsUrl(a1.getString("news_url"));
                investment.setNewsTitle(a1.getString("news_title"));
                investment.setInvestDate(a1.getString("invest_date"));
                investment.setCreateTime(new DateTime());
                investment.setDeleteFlag(false);
                investmentList.add(investment);
            }
        }
    }

    @Test
    public void a10() {
        String json = "{\n" +
                "\t\"result\": {\n" +
                "\t\t\"total\": 7,\n" +
                "\t\t\"items\": [\n" +
                "\t\t\t{\n" +
                "\t\t\t\t\"date\": null,\n" +
                "\t\t\t\t\"money\": \"239.40亿港元\",\n" +
                "\t\t\t\t\"round\": \"IPO上市\",\n" +
                "\t\t\t\t\"newsUrl\": \"http://www.xinhuanet.com/2021-03/23/c_1127245948.htm\",\n" +
                "\t\t\t\t\"companyName\": \"北京百度网讯科技有限公司\",\n" +
                "\t\t\t\t\"pubTime\": 1616428800000,\n" +
                "\t\t\t\t\"newsTitle\": \"百度集团今起正式在港上市\",\n" +
                "\t\t\t\t\"investorName\": \"公开发行\",\n" +
                "\t\t\t\t\"share\": \"\",\n" +
                "\t\t\t\t\"value\": \"\"\n" +
                "\t\t\t}\n" +
                "\t\t]\n" +
                "\t},\n" +
                "\t\"reason\": \"ok\",\n" +
                "\t\"error_code\": 0\n" +
                "}";
        JSONObject jsonObject = JSONObject.parseObject(json);
        String code = jsonObject.getString("error_code");
        jsonObject = JSONObject.parseObject(json).getJSONObject("result");
        String total = jsonObject.getString("total");
        JSONArray array = jsonObject.getJSONArray("items");
        List<EnterpriseFinancing> financingList = new ArrayList<>();
        if (array.size() > 0) {
            EnterpriseFinancing financing = null;
            JSONObject a1 = null;
            for (Object o : array) {
                a1 = (JSONObject) o;
                financing = new EnterpriseFinancing();
                financing.setMoney(a1.getString("money"));
                financing.setRound(a1.getString("round"));
                financing.setNewsUrl(a1.getString("newsUrl"));
                financing.setCompanyName(a1.getString("companyName"));
                financing.setPubTime(a1.getDate("pubTime"));
                financing.setNewsTitle(a1.getString("newsTitle"));
                financing.setInvestorName(a1.getString("investorName"));
                financing.setShare(a1.getString("share"));
                financing.setValue(a1.getString("value"));
                financing.setCreateTime(new DateTime());
                financing.setDeleteFlag(false);
                financingList.add(financing);
            }
        }
    }

    @Test
    public void a11() {
        String json = "{\n" +
                "\t\"result\": {\n" +
                "\t\t\"total\": 2947,\n" +
                "\t\t\"items\": [\n" +
                "\t\t\t{\n" +
                "\t\t\t\t\"education\": \"本科\",\n" +
                "\t\t\t\t\"city\": \"北京市\",\n" +
                "\t\t\t\t\"companyName\": \"北京百度网讯科技有限公司\",\n" +
                "\t\t\t\t\"webInfoPath\": \"https://www.lagou.com/jobs/8824542.html?utm_source=m_cf_bd_tianyancha_zhw\",\n" +
                "\t\t\t\t\"source\": \"拉勾网\",\n" +
                "\t\t\t\t\"title\": \"php研发工程师\",\n" +
                "\t\t\t\t\"experience\": \"1-3年\",\n" +
                "\t\t\t\t\"companyGid\": \"22822\",\n" +
                "\t\t\t\t\"salary\": \"15000－30000元/月\",\n" +
                "\t\t\t\t\"startDate\": 1621526400000\n" +
                "\t\t\t}\n" +
                "\t\t]\n" +
                "\t},\n" +
                "\t\"reason\": \"ok\",\n" +
                "\t\"error_code\": 0\n" +
                "}";
        JSONObject jsonObject = JSONObject.parseObject(json);
        System.out.println(jsonObject);
        String code = jsonObject.getString("error_code");
        jsonObject = JSONObject.parseObject(json).getJSONObject("result");
        System.out.println(jsonObject);
        String total = jsonObject.getString("total");
        JSONArray array = jsonObject.getJSONArray("items");
        List<EnterpriseRecruitment> recruitmentList = new ArrayList<>();
        if (array.size() > 0) {
            EnterpriseRecruitment recruitment = null;
            JSONObject a1 = null;
            for (Object o : array) {
                a1 = (JSONObject) o;
                recruitment = new EnterpriseRecruitment();
                recruitment.setEducation(a1.getString("education"));
                recruitment.setCity(a1.getString("city"));
                recruitment.setCompanyName(a1.getString("companyName"));
                recruitment.setWebInfoPath(a1.getString("webInfoPath"));
                recruitment.setSource(a1.getString("source"));
                recruitment.setTitle(a1.getString("title"));
                recruitment.setExperience(a1.getString("experience"));
                recruitment.setCompanyGid(a1.getString("companyGid"));
                recruitment.setSalary(a1.getString("salary"));
                recruitment.setStartDate(a1.getDate("startDate"));
                recruitmentList.add(recruitment);
            }
        }
    }

    @Test
    public void a12() {
        String json = "{\n" +
                "\t\"result\": {\n" +
                "\t\t\"total\": 11,\n" +
                "\t\t\"items\": [\n" +
                "\t\t\t{\n" +
                "\t\t\t\t\"licenceContent\": \"变更(或延续)广播电视节目制作经营单位许可\",\n" +
                "\t\t\t\t\"licenceDepartment\": \"北京市广播电视局\",\n" +
                "\t\t\t\t\"areaCode\": \"\",\n" +
                "\t\t\t\t\"endDate\": \"2023-05-14\",\n" +
                "\t\t\t\t\"licenceName\": \"\",\n" +
                "\t\t\t\t\"licenseNumber\": \"京广行许字〔2021〕00312021030900116号\",\n" +
                "\t\t\t\t\"source\": \"信用中国\",\n" +
                "\t\t\t\t\"auditType\": \"普通\",\n" +
                "\t\t\t\t\"dataUpdateTime\": \"\",\n" +
                "\t\t\t\t\"decisionDate\": \"1620921600000\",\n" +
                "\t\t\t\t\"legalPersonName\": \"\"\n" +
                "\t\t\t}\n" +
                "\t\t]\n" +
                "\t},\n" +
                "\t\"reason\": \"ok\",\n" +
                "\t\"error_code\": 0\n" +
                "}";
        JSONObject jsonObject = JSONObject.parseObject(json);
        System.out.println(jsonObject);
        String code = jsonObject.getString("error_code");
        jsonObject = JSONObject.parseObject(json).getJSONObject("result");
        System.out.println(jsonObject);
        String total = jsonObject.getString("total");
        JSONArray array = jsonObject.getJSONArray("items");
        List<EnterpriseAdministrative> administrativeList = new ArrayList<>();
        if (array.size() > 0) {
            JSONObject a1 = null;
            EnterpriseAdministrative administrative = null;
            for (Object o : array) {
                a1 = (JSONObject) o;
                administrative = new EnterpriseAdministrative();
                administrative.setLicenceContent(a1.getString("licenceContent"));
                administrative.setLicenceDepartment(a1.getString("licenceDepartment"));
                administrative.setAreaCode(a1.getString("areaCode"));
                administrative.setEndDate(a1.getDate("endDate"));
                administrative.setLicenceName(a1.getString("licenceName"));
                administrative.setLicenseNumber(a1.getString("licenseNumber"));
                administrative.setSource(a1.getString("source"));
                administrative.setAuditType(a1.getString("auditType"));
                administrative.setDataUpdateTime(a1.getString("dataUpdateTime"));
                administrative.setDecisionDate(a1.getDate("decisionDate"));
                administrative.setLegalPersonName(a1.getString("legalPersonName"));
                administrativeList.add(administrative);
            }
        }
    }

    @Test
    public void a13() {
        String json = "{\n" +
                "    \"result\": {\n" +
                "        \"total\": 5,\n" +
                "        \"items\": [\n" +
                "            {\n" +
                "                \"year\": \"2020\",\n" +
                "                \"grade\": \"A\",\n" +
                "                \"name\": \"北京百度网讯科技有限公司\",\n" +
                "                \"type\": \"国税\",\n" +
                "                \"idNumber\": \"91110000802100433B\",\n" +
                "                \"evalDepartment\": \"国家税务总局\"\n" +
                "            },\n" +
                "            {\n" +
                "                \"year\": \"2018\",\n" +
                "                \"grade\": \"A\",\n" +
                "                \"name\": \"北京百度网讯科技有限公司\",\n" +
                "                \"type\": \"国税\",\n" +
                "                \"idNumber\": \"91110000802100433B\",\n" +
                "                \"evalDepartment\": \"国家税务总局\"\n" +
                "            },\n" +
                "            {\n" +
                "                \"year\": \"2016\",\n" +
                "                \"grade\": \"A\",\n" +
                "                \"name\": \"北京百度网讯科技有限公司\",\n" +
                "                \"type\": \"国税\",\n" +
                "                \"idNumber\": \"110108802100433\",\n" +
                "                \"evalDepartment\": \"国家税务总局\"\n" +
                "            },\n" +
                "            {\n" +
                "                \"year\": \"2015\",\n" +
                "                \"grade\": \"A\",\n" +
                "                \"name\": \"北京百度网讯科技有限公司\",\n" +
                "                \"type\": \"国税\",\n" +
                "                \"idNumber\": \"110108802100433\",\n" +
                "                \"evalDepartment\": \"国家税务总局\"\n" +
                "            },\n" +
                "            {\n" +
                "                \"year\": \"2014\",\n" +
                "                \"grade\": \"A\",\n" +
                "                \"name\": \"北京百度网讯科技有限公司\",\n" +
                "                \"type\": \"国税\",\n" +
                "                \"idNumber\": \"110108802100433\",\n" +
                "                \"evalDepartment\": \"国家税务总局\"\n" +
                "            }\n" +
                "        ]\n" +
                "    },\n" +
                "    \"reason\": \"ok\",\n" +
                "    \"error_code\": 0\n" +
                "}";
        JSONObject jsonObject = JSONObject.parseObject(json);
        System.out.println(jsonObject);
        String code = jsonObject.getString("error_code");
        jsonObject = JSONObject.parseObject(json).getJSONObject("result");
        System.out.println(jsonObject);
        String total = jsonObject.getString("total");
        JSONArray array = jsonObject.getJSONArray("items");
        List<EnterpriseTax> taxList = new ArrayList<>();
        if (array.size() > 0) {
            JSONObject a1 = null;
            EnterpriseTax tax = null;
            for (Object o : array) {
                a1 = (JSONObject) o;
                tax = new EnterpriseTax();
                tax.setYear(a1.getString("year"));
                tax.setGrade(a1.getString("grade"));
                tax.setName(a1.getString("name"));
                tax.setType(a1.getString("type"));
                tax.setIdNumber(a1.getString("idNumber"));
                tax.setEvalDepartment(a1.getString("evalDepartment"));
                taxList.add(tax);
            }
        }
    }

    @Test
    public void a14() {
        String json = "{\n" +
                "\t\"result\": {\n" +
                "\t\t\"total\": 65,\n" +
                "\t\t\"items\": [\n" +
                "\t\t\t{\n" +
                "\t\t\t\t\"brief\": \"【产品介绍】\\n“百度糯米商家”是百度糯米推出的移动端商家后台，帮助商家可以更便捷地在手机上进行验证、管理团单、回应用户评价，真正做到随时随地服务商家，帮助商家在百度糯米获得更大收益。\\n\\n【主要功能】\\n-验券：支持验证糯米券码以及储值卡验证码，统一验证入口，更便捷！\\n-验证记录：包括糯米券消费记录以及储值卡消费记录，不同日期、不同项目、不同分店查看验证历史，让验证管理更方便！\\n-评价回复：手机可随时回复各个团购项目的用户评价，及时与用户交流！\\n-项目管理：查看在线团单，及时处理团单方案、延期、重新上线；\\n-电子储值卡：及时了解储值卡数据，衡量项目效果！\\n\\n【联系我们】\\n官方网站：y.nuomi.com\\n商服电话：4009-218-218\\n新浪微博：@百度糯米（http://weibo.com/nuomiwang ）\",\n" +
                "\t\t\t\t\"classes\": \"其它\",\n" +
                "\t\t\t\t\"filterName\": \"百度糯米商家\",\n" +
                "\t\t\t\t\"icon\": \"https://img5.tianyancha.com/appbk/icon/9b9c2e7ddc818c55379a9c991bddcce9.png@!watermark01\",\n" +
                "\t\t\t\t\"name\": \"百度糯米商家\",\n" +
                "\t\t\t\t\"type\": \"应用\",\n" +
                "\t\t\t\t\"uuid\": \"a485037197cd462cde0602f5a125c654\"\n" +
                "\t\t\t}\n" +
                "\t\t]\n" +
                "\t},\n" +
                "\t\"reason\": \"ok\",\n" +
                "\t\"error_code\": 0\n" +
                "}";
        JSONObject jsonObject = JSONObject.parseObject(json);
        System.out.println(jsonObject);
        String code = jsonObject.getString("error_code");
        jsonObject = JSONObject.parseObject(json).getJSONObject("result");
        System.out.println(jsonObject);
        String total = jsonObject.getString("total");
        JSONArray array = jsonObject.getJSONArray("items");
        List<EnterpriseInformationProduct> productList = new ArrayList<>();
        if (array.size() > 0) {
            JSONObject a1 = null;
            EnterpriseInformationProduct product = null;
            for (Object o : array) {
                a1 = (JSONObject) o;
                product = new EnterpriseInformationProduct();
                product.setBrief(a1.getString("brief"));
                product.setClasses(a1.getString("classes"));
                product.setFilterName(a1.getString("filterName"));
                product.setIcon(a1.getString("icon"));
                product.setName(a1.getString("name"));
                product.setType(a1.getString("type"));
                product.setUuid(a1.getString("uuid"));
                product.setCreateTime(new DateTime());
                product.setDeleteFlag(false);
                productList.add(product);
            }
        }
    }

    @Test
    public void a15() {
        String json = "{\n" +
                "  \"error_code\": 0,\n" +
                "  \"reason\": \"ok\",\n" +
                "  \"result\": \"百度，全球最大的中文搜索引擎、最大的中文网站。2000年1月创立于北京中关村。1999年底，身在美国硅谷的李彦宏看到了中国互联网及中文搜索引擎服务的巨大发展潜力，抱着技术改变世界的梦想，他毅然辞掉硅谷的高薪工作，携搜索引擎专利技术，于2000年1月1日在中关村创建了百度公司。从最初的不足10人发展至今，员工人数超过18000人。如今的百度，已成为中国最受欢迎、影响力最大的中文网站。百度拥有数千名研发工程师，这是中国乃至全球最为优秀的技术团队，这支队伍掌握着世界上最为先进的搜索引擎技术，使百度成为中国掌握世界尖端科学核心技术的中国高科技企业，也使中国成为美国、俄罗斯、和韩国之外，全球仅有的4个拥有搜索引擎核心技术的国家之一。从创立之初，百度便将“让人们最平等、便捷地获取信息，找到所求”作为自己的使命，成立以来，公司秉承“以用户为导向”的理念，不断坚持技术创新，致力于为用户提供“简单，可依赖”的互联网搜索产品及服务，其中包括：以网络搜索为主的功能性搜索，以贴吧为主的社区搜索，针对各区域、行业所需的垂直搜索，Mp3搜索，以及门户频道、IM等，全面覆盖了中文网络世界所有的搜索需求，根据第三方权威数据，百度在中国的搜索份额超过80%。在面对用户的搜索产品不断丰富的同时，百度还创新性地推出了基于搜索的营销推广服务，并成为最受企业青睐的互联网营销推广平台。如今，中国已有数十万家企业使用了百度的搜索推广服务，不断提升企业自身的品牌及运营效率。通过持续的商业模式创新，百度正进一步带动整个互联网行业和中小企业的经济增长，推动社会经济的发展和转型。为推动中国数百万中小网站的发展，百度借助超大流量的平台优势，联合所有优质的各类网站，建立了世界上最大的网络联盟，使各类企业的搜索推广、品牌营销的价值、覆盖面均大面积提升。与此同时，各网站也在联盟大家庭的互助下，获得最大的生存与发展机会。作为国内的一家知名企业，百度也一直秉承“弥合信息鸿沟，共享知识社会”的责任理念，坚持履行企业公民的社会责任。成立来，百度利用自身优势积极投身公益事业，先后投入巨大资源，为盲人、少儿、老年人群体打造专门的搜索产品，解决了特殊群体上网难问题,极大地弥补了社会信息鸿沟问题。此外，在加速推动中国信息化进程、净化网络环境、搜索引擎教育及提升大学生就业率等方面，百度也一直走在行业领先的地位。2011年初，百度还特别成立了百度基金会，围绕知识教育、环境保护、灾难救助等领域，更加系统规范地管理和践行公益事业。2005年，百度在美国纳斯达克上市，一举打破首日涨幅最高等多项纪录，并成为首家进入纳斯达克成分股的中国公司。通过数年来的市场表现，百度优异的业绩与值得依赖的回报，使之成为中国企业价值的代表，傲然屹立于全球资本市场。2009年，百度推出全新的框计算技术概念，并基于此理念推出百度开放平台，帮助更多优秀的第三方开发者利用互联网平台自主创新、自主创业，在大幅提升网民互联网使用体验的同时，带动起围绕用户需求进行研发的产业创新热潮，对中国互联网产业的升级和发展产生巨大的拉动效应。随着中国互联网从PC端向移动端转型，百度也在积极围绕核心战略加大对移动和云领域的投入和布局，不断把PC领域的优势向移动领域扩展。在通过技术创新不断满足用户的移动搜索需求的同时，百度也在继续积极推动移动云生态系统的建设和发展，与产业实现共赢。2012年9月，百度面向开发者全面开放包括云存储、大数据智能和云计算在内的核心云能力，为开发者量身定制从开发到运营的“七种武器”，为开发者提供更强大的技术运营支持与推广变现保障，以帮助他们在移动云时代获得更好的收益和成长。如今，百度已经成为中国最具价值的品牌之一，英国《金融时报》将百度列为“中国十大世界级品牌”，成为这个榜单中最年轻的一家公司，也是唯一一家互联网公司。而“亚洲最受尊敬企业”、“全球最具创新力企业”、“中国互联网力量之星”等一系列荣誉称号的获得，也无一不向外界展示着百度成立数年来的成就。多年来，百度董事长兼CEO李彦宏，率领百度人所形成的“简单可依赖”的核心文化，深深地植根于百度。这是一个充满朝气、求实坦诚的公司，以搜索改变生活，推动人类的文明与进步，促进中国经济的发展为己任，正朝着更为远大的目标而迈进。\"\n" +
                "}";
        JSONObject jsonObject = JSONObject.parseObject(json);
        System.out.println(jsonObject);
        String code = jsonObject.getString("error_code");
        EnterpriseAbstract enterpriseAbstract = new EnterpriseAbstract();
        enterpriseAbstract.setResult(jsonObject.getString("result"));
        enterpriseAbstract.setCreateTime(new DateTime());
        enterpriseAbstract.setDeleteFlag(false);
    }

    @Test
    public void a16() {
        String json = "{\n" +
                "    \"result\": {\n" +
                "        \"total\": 1,\n" +
                "        \"items\": [\n" +
                "            {\n" +
                "                \"jigou_name\": \"百度投资并购部\",\n" +
                "                \"area\": \"北京\",\n" +
                "                \"orgCode\": \"b99262984\",\n" +
                "                \"imgPath\": \"https://img5.tianyancha.com/logo/jigou/da65d92c5f3627d0f3b37a2abfac0f64.jpg@!f_200x200\",\n" +
                "                \"desc\": \"百度集团投资并购部是百度集团的投资部门，致力于通过投资和收购不断促进业务发展。\",\n" +
                "                \"foundYear\": \"2000年\"\n" +
                "            }\n" +
                "        ]\n" +
                "    },\n" +
                "    \"reason\": \"ok\",\n" +
                "    \"error_code\": 0\n" +
                "}";
        JSONObject jsonObject = JSONObject.parseObject(json);
        System.out.println(jsonObject);
        String code = jsonObject.getString("error_code");
        List<EnterpriseInvestmentInstitutions> institutionsList = new ArrayList<>();
        if (code.equals("0")) {
            jsonObject = JSONObject.parseObject(json).getJSONObject("result");
            System.out.println(jsonObject);
            Integer total = jsonObject.getInteger("total");
            JSONArray array = jsonObject.getJSONArray("items");
            if (array != null && array.size() > 0) {
                EnterpriseInvestmentInstitutions institutions = null;
                JSONObject a1 = null;
                for (Object o : array) {
                    a1 = (JSONObject) o;
                    institutions = new EnterpriseInvestmentInstitutions();
                    institutions.setJigouName(a1.getString("jigou_name"));
                    institutions.setArea(a1.getString("area"));
                    institutions.setOrgCode(a1.getString("orgCode"));
                    institutions.setImgPath(a1.getString("imgPath"));
                    institutions.setJigouDesc(a1.getString("desc"));
                    institutions.setFoundYear(a1.getString("foundYear"));
                    institutions.setCreateTime(new DateTime());
                    institutions.setDeleteFlag(false);
                    institutionsList.add(institutions);
                }
            }
            //return institutionsList;
        }
        //return null;
    }

    @Test
    public void a17() {
        String json = "{\n" +
                "  \"error_code\": 0,\n" +
                "  \"reason\": \"ok\",\n" +
                "  \"result\": {\n" +
                "    \"introduction\": \"李彦宏，北京百度网讯科技有限公司董事长兼首席执行官。全国政协委员、全国工商联副主席、北京市科协副主席、武汉大学客座教授、中国科学技术大学客座教授、南开大学兼职教授，李彦宏还是联合国艾滋病规划署全球委员及爱佑华夏慈善基金会理事会理事。\\n中文名：李彦宏\\n外文名：Robin\\n国 籍：中国\\n出生地山：山西省阳泉市\\n出生日期：1968年11月17日\\n职 业：百度公司董事长兼首席执行官\\n毕业院校：北京大学，布法罗纽约州立大学\\n在搜索引擎发展初期，李彦宏作为全球最早研究者之一，最先创建了ESP技术，并将它成功的应用于INFOSEEK/GO. COM的搜索引擎中。GO. COM的图像搜索引擎是他的另一项极具应用价值的技术创新。\\n创立百度之前，李彦宏已经跻身全球最顶尖的搜索引擎工程师行列，其拥有的“超链分析”技术专利，是奠定整个现代搜索引擎发展趋势和方向的基础发明之一。\\n百度的成功，也使中国成为美国、俄罗斯、和韩国之外，全球仅有的4个拥有搜索引擎核心技术的国家之一。\\n当年李彦宏在美国抛弃唾手可得的博士帽，艰苦创业的时候，美国IT界最火的是电子商务。无数人拼了老命想要挤上这辆被看好的网络列车，甚至不惜抛掉自己熟悉的行业。李彦宏没有跟随大流进入电子商务领域，而是悄悄走到了尚少有人问津的网络搜索领域。因为他看到了搜索对网络世界可能产生的巨大影响。\\n当年李彦宏在美国抛弃唾手可得的博士帽，艰苦创业的时候，美国IT界最火的是电子商务。无数人拼了老命想要挤上这辆被看好的网络列车，甚至不惜抛掉自己熟悉的行业。李彦宏没有跟随大流进入电子商务领域，而是悄悄走到了尚少有人问津的网络搜索领域。因为他看到了搜索对网络世界可能产生的巨大影响。\\n李彦宏告诫跃跃欲试的年轻人：一定要有向前看两年的眼光。跟风、赶潮流，你吃到的很可能只是残羹冷炙。\\n'这个项目多久可以完成？'\\n'6个月。'\\n'4个月行吗？给你加50%的报酬。'\\n'对不起，我做不到。'\\n这是在李彦宏创业之初和一个客户的一次对话。后来，这个客户告诉他，对于李彦宏的拒绝，他感到非常满意，因为这反映出李彦宏是一个很真实和稳重的人，这样他的产品在质量上一定会有保证的。\\n在创业过程中，'有钱走遍天下，无钱寸步难行'是颠扑不破的真理。在美国硅谷里，每天都有公司因为有了风险投资而开山立派，每天也都有公司因为囊中羞涩而关门大吉。李彦宏认为，一定要在不需要钱的时候去向投资人寻求投资。\\n'不要轻易将主动权交给投资人，在创业的过程中没有人会乐善好施。'李彦宏告诫创业的青年人，'一定要在尚不缺钱的时候借到下一步需要的钱。'\\n在创业的初期，创业者常常会因为有了一两个固定的大用户而偷笑不止。'或许不久就是想哭都哭不出来啊。'李彦宏这样说。\\n他刚回国创业的时候，公司主要是服务于几大门户网站。这几大网站都占据了公司收入的10%以上，任何一个客户的流失，都会对公司的效益造成极大的影响。\\n'命运只能掌握在自己手中，绝不能操纵在别人手中。'\\n过早地实现赢利就是在大量地缩减对技术的投入。\\n李彦宏认为，一个创新的公司，在技术上一定需要大规模的投入。这样才能使自己在技术上一直处于领先甚至于垄断的地位。而这种领先在今后一定会带给企业大的回报。牺牲企业的长远利益宣布赢利，是不理智的行为。\\n从1999年公司成立到现在，4年的时间里，互联网世界沧海桑田，'网络游戏''短信平台'纷纷强势登场，不少人捷足先登，赚得盆满钵满；不少人跟风而动，也摔得头破血流。而李彦宏说他只在做一件事：搜索。在他眼里，自己的公司，自己的领域还有很深的潜力可以挖掘，自己目前要做的只是将搜索这一个领域不断翻新。'在今后的若干年，百度也将只在搜索领域发展。'李彦宏如是说。\\n从1999年公司成立到现在，4年的时间里，互联网世界沧海桑田，'网络游戏''短信平台'纷纷强势登场，不少人捷足先登，赚得盆满钵满；不少人跟风而动，也摔得头破血流。而李彦宏说他只在做一件事：搜索。在他眼里，自己的公司，自己的领域还有很深的潜力可以挖掘，自己目前要做的只是将搜索这一个领域不断翻新。'在今后的若干年，百度也将只在搜索领域发展。'李彦宏如是说。\\n从1999年公司成立到现在，4年的时间里，互联网世界沧海桑田，'网络游戏''短信平台'纷纷强势登场，不少人捷足先登，赚得盆满钵满；不少人跟风而动，也摔得头破血流。而李彦宏说他只在做一件事：搜索。在他眼里，自己的公司，自己的领域还有很深的潜力可以挖掘，自己目前要做的只是将搜索这一个领域不断翻新。'在今后的若干年，百度也将只在搜索领域发展。'李彦宏如是说。\\n一个创新的过程，绝对不是一个一帆风顺的过程。如果没有足够的热爱和激情，创业者将是很难坚持下去了。所以，李彦宏对青年创业者们说，先确保你对这个事业的热爱和激情，然后再创业吧。\\n李彦宏在公司提出了“五级领导力”管理模式：\\n第一级领导力：领导者关注行动，致力于目标任务，发挥个人技能。\\n第二级领导力：领导者关注团队业绩，致力于实现团队的目标，配合团队其他成员一起开展工作，性格和善，善解人意，是优秀的团队成员。\\n第三级领导力：领导者已经成为完全意义的领导者，有着明确的领导意识，有很强的意志力、控制力，追求高效率，领导其他成员利用各种资源，朝着既定的组织目标前进。\\n第四级领导力：领导者创建组织愿景，并为目标赋予意义，把目标变为团结与激励组织的力量。\\n第五级领导力：领导者的鲜明特征是，对事专心，对人诚心，既有很强意志力，又明显谦虚、谦恭；既很执着，又很平和，形成貌似矛盾的双重性格。\\n\\n首先，洞察行业趋势，“要能看到一到两年后的市场变化，并不断问自己同样的问题，一旦答案相同，说明你已经落后了”；\\n第二，果断把握市场机会，“一旦得出了推论就要立刻着手解决，而且要比其他所有人都做得好”；\\n第三，极强的沟通技巧，“善于影响、发展、推动、改变、激励他人，营造良好的工作氛围”；\\n第四，在复杂多变的情况下，通过一系列综合思考的决策技巧，应变式地找出或开发新的解决方案。\\n\",\n" +
                "    \"weibo\": \"\",\n" +
                "    \"headUrl\": \"http://img.tianyancha.com/logo/human2/345609db75383b411884a401a6f3665e.png@!watermark01\"\n" +
                "  }\n" +
                "}";
        JSONObject jsonObject = JSONObject.parseObject(json);
        System.out.println(jsonObject);
        String code = jsonObject.getString("error_code");
        List<EnterpriseInvestmentInstitutions> institutionsList = new ArrayList<>();
        if (code.equals("0")) {
            jsonObject = JSONObject.parseObject(json).getJSONObject("result");
            System.out.println(jsonObject);
            String weibo = jsonObject.getString("weibo");
            String headUrl = jsonObject.getString("headUrl");
            String introduction = jsonObject.getString("introduction");
            System.out.println(weibo);
            System.out.println(headUrl);
            System.out.println(introduction);
        }
    }

    @Test
    public void a18() {
        String json = "{\n" +
                "\t\"result\": {\n" +
                "\t\t\"total\": 5000,\n" +
                "\t\t\"items\": [\n" +
                "\t\t\t{\n" +
                "\t\t\t\t\"docType\": \"裁定书\",\n" +
                "\t\t\t\t\"lawsuitUrl\": \"https://www.tianyancha.com/lawsuit/6947017e065c457eb4db3b2652304992\",\n" +
                "\t\t\t\t\"lawsuitH5Url\": \"https://m.tianyancha.com/app/h5/lawsuit/6947017e065c457eb4db3b2652304992\",\n" +
                "\t\t\t\t\"title\": \"北京汇硕咨询服务有限公司与北京威盛旅游咨询有限公司网络侵权责任纠纷一审民事裁定书\",\n" +
                "\t\t\t\t\"court\": \"北京互联网法院\",\n" +
                "\t\t\t\t\"judgeTime\": \"2021-01-14\",\n" +
                "\t\t\t\t\"uuid\": \"6947017e065c457eb4db3b2652304992\",\n" +
                "\t\t\t\t\"caseNo\": \"（2019）京0491民初38061号\",\n" +
                "\t\t\t\t\"caseType\": \"民事案件\",\n" +
                "\t\t\t\t\"caseReason\": \"网络侵权责任纠纷\",\n" +
                "\t\t\t\t\"casePersons\": [\n" +
                "\t\t\t\t\t{\n" +
                "\t\t\t\t\t\t\"result\": \"撤诉\",\n" +
                "\t\t\t\t\t\t\"role\": \"原告\",\n" +
                "\t\t\t\t\t\t\"gid\": \"3199082382\",\n" +
                "\t\t\t\t\t\t\"emotion\": 0,\n" +
                "\t\t\t\t\t\t\"name\": \"北京汇硕咨询服务有限公司\",\n" +
                "\t\t\t\t\t\t\"type\": \"2\"\n" +
                "\t\t\t\t\t}\n" +
                "\t\t\t\t],\n" +
                "\t\t\t\t\"caseMoney\": \"\",\n" +
                "\t\t\t\t\"submitTime\": 1628784000000,\n" +
                "\t\t\t\t\"id\": 334971959\n" +
                "\t\t\t}\n" +
                "\t\t]\n" +
                "\t},\n" +
                "\t\"reason\": \"ok\",\n" +
                "\t\"error_code\": 0\n" +
                "}";
        JSONObject jsonObject = JSONObject.parseObject(json);
        String code = jsonObject.getString("error_code");
        List<EnterpriseLegalAction> legalActionList = new ArrayList<>();
        if (code.equals("0")) {
            jsonObject = JSONObject.parseObject(json).getJSONObject("result");
            System.out.println(jsonObject);
            Integer total = jsonObject.getInteger("total");
            JSONArray array = jsonObject.getJSONArray("items");
            if (array.size() > 0) {
                System.out.println(array);
                JSONObject a1 = null;
                JSONObject a2 = null;
                JSONArray a3 = null;
                EnterpriseLegalAction legalAction = null;
                EnterpriseLegalPersons persons = null;
                List<EnterpriseLegalPersons> personsList = null;
                for (Object o : array) {
                    a1 = (JSONObject) o;
                    legalAction = new EnterpriseLegalAction();
                    legalAction.setDocType(a1.getString("docType"));
                    legalAction.setLawsuitUrl(a1.getString("lawsuitUrl"));
                    legalAction.setLawsuitH5Url(a1.getString("lawsuitH5Url"));
                    legalAction.setTitle(a1.getString("title"));
                    legalAction.setCourt(a1.getString("court"));
                    legalAction.setJudgeTime(a1.getDate("judgeTime"));
                    legalAction.setUuid(a1.getString("uuid"));
                    legalAction.setCaseNo(a1.getString("caseNo"));
                    legalAction.setCaseType(a1.getString("caseType"));
                    legalAction.setCaseReason(a1.getString("caseReason"));
                    legalAction.setCaseMoney(a1.getString("caseMoney"));
                    legalAction.setSubmitTime(a1.getDate("submitTime"));
                    legalAction.setEyeId(a1.getLong("id"));
                    a3 = a1.getJSONArray("casePersons");
                    personsList = new ArrayList<>();
                    for (Object o1 : a3) {
                        a2 = (JSONObject) o1;
                        persons = new EnterpriseLegalPersons();
                        persons.setRole(a2.getString("role"));
                        persons.setResult(a2.getString("result"));
                        persons.setGid(a2.getString("gid"));
                        persons.setEmotion(a2.getInteger("emotion"));
                        persons.setName(a2.getString("name"));
                        persons.setType(a2.getString("type"));
                        personsList.add(persons);
                    }
                    legalAction.setPersonsList(personsList);
                    legalActionList.add(legalAction);
                }
            }
            if (total / Contents.pageNum > 0) {
                for (int i = 2; i <= 3; i++) {
                    //json= MyHttpUtils.GetJson(Contents.token,"http://open.api.tianyancha.com/services/open/cd/investOrg/2.0?pageSize=20&keyword="+enterpriseName+"&pageNum="+i+"");
                    jsonObject = JSONObject.parseObject(json).getJSONObject("result");
                    System.out.println(jsonObject);
                    array = jsonObject.getJSONArray("items");
                    if (array.size() > 0) {
                        System.out.println(array);
                        JSONObject a1 = null;
                        JSONObject a2 = null;
                        JSONArray a3 = null;
                        EnterpriseLegalAction legalAction = null;
                        EnterpriseLegalPersons persons = null;
                        List<EnterpriseLegalPersons> personsList = null;
                        for (Object o : array) {
                            a1 = (JSONObject) o;
                            legalAction = new EnterpriseLegalAction();
                            legalAction.setDocType(a1.getString("docType"));
                            legalAction.setLawsuitUrl(a1.getString("lawsuitUrl"));
                            legalAction.setLawsuitH5Url(a1.getString("lawsuitH5Url"));
                            legalAction.setTitle(a1.getString("title"));
                            legalAction.setCourt(a1.getString("court"));
                            legalAction.setJudgeTime(a1.getDate("judgeTime"));
                            legalAction.setUuid(a1.getString("uuid"));
                            legalAction.setCaseNo(a1.getString("caseNo"));
                            legalAction.setCaseType(a1.getString("caseType"));
                            legalAction.setCaseReason(a1.getString("caseReason"));
                            legalAction.setCaseMoney(a1.getString("caseMoney"));
                            legalAction.setSubmitTime(a1.getDate("submitTime"));
                            legalAction.setEyeId(a1.getLong("id"));
                            a3 = a1.getJSONArray("casePersons");
                            personsList = new ArrayList<>();
                            for (Object o1 : a3) {
                                a2 = (JSONObject) o1;
                                persons = new EnterpriseLegalPersons();
                                persons.setRole(a2.getString("role"));
                                persons.setResult(a2.getString("result"));
                                persons.setGid(a2.getString("gid"));
                                persons.setEmotion(a2.getInteger("emotion"));
                                persons.setName(a2.getString("name"));
                                persons.setType(a2.getString("type"));
                                personsList.add(persons);
                            }
                            legalAction.setPersonsList(personsList);
                            legalActionList.add(legalAction);
                        }
                    }
                }
            }
        }
    }

    @Test
    public void a19() {
        String json = "{\n" +
                "\t\"result\": {\n" +
                "\t\t\"total\": 25,\n" +
                "\t\t\"items\": [\n" +
                "\t\t\t{\n" +
                "\t\t\t\t\"departmentName\": \"北京市文化和旅游局\",\n" +
                "\t\t\t\t\"reason\": \"现已查实,该(单位)于2016年01月与2020年11月期间,经营的“百度阅读”网(yuedu.baidu.com)传播的《宝贝,无你不欢》(作者:戎客骨)、《魔化武装》(作者:易辟)、《辰起之国》(作者:子酣)、《娇妻求饶:霍少请节制》(作者:风小筝)、《豪门首席嫩妻》(作者:灵猫香)、《甜妻难养:嗜血总裁7日情》(作者:叫兽萌)、《将门悍妻》(作者:不倒先生)、《撩夫成瘾:契约娇妻乖一点》(作者:于牧然)等8部小说含有“轻轻的扳开苏忆的双腿”、“女子的媚态,使得男人更加激动,不禁加快了抽送的速度,在激烈的冲刺之后,男人终于一声低吼,倾囊而泄”、“已经迫不及待地将要爆炸的rou棒挺进了聂含璋的身体内”等内容,属含有禁止内容的网络出版物。违法经营额310元,无违法所得。,该(单位)的上述行为违反了《网络出版服务管理规定》第二十四条第(七)项的规定。\",\n" +
                "\t\t\t\t\"evidence\": \"《网络出版服务管理规定》第五十二条第一款\",\n" +
                "\t\t\t\t\"punishStatus\": \"\",\n" +
                "\t\t\t\t\"remark\": \"\",\n" +
                "\t\t\t\t\"source\": \"信用中国\",\n" +
                "\t\t\t\t\"type\": \"罚款\",\n" +
                "\t\t\t\t\"content\": \"罚款人民币贰万元。\",\n" +
                "\t\t\t\t\"decisionDate\": \"2021-03-29\",\n" +
                "\t\t\t\t\"legalPersonName\": \"\",\n" +
                "\t\t\t\t\"punishName\": \"经营的“百度阅读”网(yuedu.baidu.com)传播的《宝贝,无你不欢》(作者:戎客骨)、《魔化武装》(作者:易辟)、《辰起之国》(作者:子酣)、《娇妻求饶:霍少请节制》(作者:风小筝)、《豪门首席嫩妻》(作者:灵猫香)、《甜妻难养:嗜血总裁7日情》(作者:叫兽萌)、《将门悍妻》(作者:不倒先生)、《撩夫成瘾:契约娇妻乖一点》(作者:于牧然)等8部小说含有“轻轻的扳开苏忆的双腿”、“女子的媚态,使得男人更加激动,不禁加快了抽送的速度,在激烈的冲刺之后,男人终于一声低吼,倾囊而泄”、“已经迫不及待地将要爆炸的rou棒挺进了聂含璋的身体内”等内容,属含有禁止内容的网络出版物。违法经营额310元,无违法所得。\",\n" +
                "\t\t\t\t\"punishNumber\": \"（京）文执罚〔2021〕第400154号\",\n" +
                "\t\t\t\t\"typeSecond\": \"\"\n" +
                "\t\t\t}\n" +
                "\t\t]\n" +
                "\t},\n" +
                "\t\"reason\": \"ok\",\n" +
                "\t\"error_code\": 0\n" +
                "}";
        JSONObject jsonObject = JSONObject.parseObject(json);
        String code = jsonObject.getString("error_code");
        List<EnterpriseAdministrativePenalty> list = new ArrayList<>();
        if (code.equals("0")) {
            jsonObject = JSONObject.parseObject(json).getJSONObject("result");
            System.out.println(jsonObject);
            Integer total = jsonObject.getInteger("total");
            JSONArray array = jsonObject.getJSONArray("items");
            if (array.size() > 0) {
                System.out.println(array);
                JSONObject a1 = null;
                EnterpriseAdministrativePenalty penalty = null;
                for (Object o : array) {
                    a1 = (JSONObject) o;
                    penalty = new EnterpriseAdministrativePenalty();
                    penalty.setDepartmentName(a1.getString("departmentName"));
                    penalty.setReason(a1.getString("reason"));
                    penalty.setEvidence(a1.getString("evidence"));
                    penalty.setPunishStatus(a1.getString("punishStatus"));
                    penalty.setRemark(a1.getString("remark"));
                    penalty.setSource(a1.getString("source"));
                    penalty.setType(a1.getString("type"));
                    penalty.setContent(a1.getString("content"));
                    penalty.setDecisionDate(a1.getDate("decisionDate"));
                    penalty.setLegalPersonName(a1.getString("legalPersonName"));
                    penalty.setPunishName(a1.getString("punishName"));
                    penalty.setPunishNumber(a1.getString("punishNumber"));
                    penalty.setTypeSecond(a1.getString("typeSecond"));
                    list.add(penalty);
                }
            }
            if (total / Contents.pageNum > 0) {
                for (int i = 2; i <= 3; i++) {
                    jsonObject = JSONObject.parseObject(json).getJSONObject("result");
                    array = jsonObject.getJSONArray("items");
                    if (array.size() > 0) {
                        JSONObject a1 = null;
                        EnterpriseAdministrativePenalty penalty = null;
                        for (Object o : array) {
                            a1 = (JSONObject) o;
                            penalty = new EnterpriseAdministrativePenalty();
                            penalty.setDepartmentName(a1.getString("departmentName"));
                            penalty.setReason(a1.getString("reason"));
                            penalty.setEvidence(a1.getString("evidence"));
                            penalty.setPunishStatus(a1.getString("punishStatus"));
                            penalty.setRemark(a1.getString("remark"));
                            penalty.setSource(a1.getString("source"));
                            penalty.setType(a1.getString("type"));
                            penalty.setContent(a1.getString("content"));
                            penalty.setDecisionDate(a1.getDate("decisionDate"));
                            penalty.setLegalPersonName(a1.getString("legalPersonName"));
                            penalty.setPunishName(a1.getString("punishName"));
                            penalty.setPunishNumber(a1.getString("punishNumber"));
                            penalty.setTypeSecond(a1.getString("typeSecond"));
                            list.add(penalty);
                        }
                    }
                }
            }
        }
    }

    @Test
    public void a20() {
        String json = Contents.b;
        JSONObject jsonObject = JSONObject.parseObject(json);
        String code = jsonObject.getString("error_code");
        List<Qualification> list = new ArrayList<>();
        if (code.equals("0")) {
            jsonObject = JSONObject.parseObject(json).getJSONObject("result");
            System.out.println(jsonObject);
            Integer total = jsonObject.getInteger("total");
            JSONArray array = jsonObject.getJSONArray("items");
            if (array.size() > 0) {
                System.out.println(array);
                JSONObject a1 = null;
                JSONObject a2 = null;
                JSONArray a3 = null;
                StringBuffer str1 = null;
                StringBuffer str2 = null;
                Qualification qualification = null;
                for (Object o : array) {
                    a1 = (JSONObject) o;
                    qualification.setCertNo(a1.getString("certNo"));
                    qualification.setEndDate(a1.getDate("endDate"));
                    qualification.setCertificateName(a1.getString("certificateName"));
                    qualification.setEyeId(a1.getString("id"));
                    qualification.setStartDate(a1.getDate("startDate"));
                    a3 = a1.getJSONArray("detail");
                    str1 = new StringBuffer();
                    str2 = new StringBuffer();
                    for (Object o1 : a3) {
                        a2 = (JSONObject) o1;
                        str1.append(a2.getString("title") + ",");
                        str2.append(a2.getString("content") + ",");
                    }
                    qualification.setTitle(str1.toString());
                    qualification.setContent(str2.toString());
                    list.add(qualification);
                }
            }
            if (total / Contents.pageNum > 0) {
                for (int i = 2; i <= 3; i++) {
                    jsonObject = JSONObject.parseObject(json).getJSONObject("result");
                    array = jsonObject.getJSONArray("items");
                    if (array.size() > 0) {
                        System.out.println(array);
                        JSONObject a1 = null;
                        JSONObject a2 = null;
                        JSONArray a3 = null;
                        StringBuffer str1 = null;
                        StringBuffer str2 = null;
                        Qualification qualification = null;
                        for (Object o : array) {
                            a1 = (JSONObject) o;
                            qualification.setCertNo(a1.getString("certNo"));
                            qualification.setEndDate(a1.getDate("endDate"));
                            qualification.setCertificateName(a1.getString("certificateName"));
                            qualification.setEyeId(a1.getString("id"));
                            qualification.setStartDate(a1.getDate("startDate"));
                            a3 = a1.getJSONArray("detail");
                            str1 = new StringBuffer();
                            str2 = new StringBuffer();
                            for (Object o1 : a3) {
                                a2 = (JSONObject) o1;
                                str1.append(a2.getString("title") + ",");
                                str2.append(a2.getString("content") + ",");
                            }
                            qualification.setTitle(str1.toString());
                            qualification.setContent(str2.toString());
                            list.add(qualification);
                        }
                    }
                }
            }
        }
    }

    @Test
    public void a21() {
        Date estiblishTime = new DateTime("2008-02-01");
        Date date = new Date();
        SimpleDateFormat format = new SimpleDateFormat("yyyy");
        Integer year = Integer.valueOf(format.format(date));
        Integer time = Integer.valueOf(format.format(estiblishTime));
        List<String> list = new ArrayList<>();
        for (int i = 0; i <= year - time; i++) {
            list.add(String.valueOf(year - i));
        }
        list.forEach(i -> {
            System.out.println(i);
        });
    }

    @Test
    public void a22(){
        System.out.println(UUIDUtils.getUUID());
    }
}
